package com.jt.zcdemo.student.service.impl;

import com.alibaba.fastjson2.JSONObject;
//import com.baomidou.dynamic.datasource.annotation.DS;
import com.jt.zcdemo.student.pojo.entity.UserInfo;
import com.jt.zcdemo.student.mapper.UserInfoMapper;
import com.jt.zcdemo.student.service.UserInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xxx
 * @since 2023-11-10
 */
@Service(value = "userService")
@Slf4j
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

//    @Resource
//    private UserInfoMapper userInfoMapper;

    @Override
    //@DS("#db")
    public List<UserInfo> getUserList(String db) {
        log.info("the first user info is:{}", JSONObject.toJSONString(this.baseMapper.selectAllUserInfo()));
        return this.baseMapper.selectList(null);
    }
}
